import 'package:flutter/material.dart';
import 'package:flutter_demo/tmac/util/DataUtil.dart';
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';

//https://segmentfault.com/a/1190000019801299
class TextPage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return TextPageState();
  }
}

class TextPageState extends State<TextPage> {
  @override
  Widget build(BuildContext context) {
    return WebviewScaffold(
      appBar: AppBar(
        title: Text("Text"),
        leading: GestureDetector(
          onTap: () {
            Navigator.pop(context);
          },
          child: Icon(Icons.arrow_back),
        ),
      ),
      url: "https://book.flutterchina.club/chapter3/text.html",
      withZoom: true,
      withLocalStorage: true,
      hidden: true,

      initialChild: Container(
        child: const Center(
          child: SizedBox(
            width: 40,
            height: 40,
            child: CircularProgressIndicator(
              valueColor: AlwaysStoppedAnimation(Colors.blue),

            ),
          ),
        ),
      ),
    );
  }
}
